//package com.sg.service.base.bff.impl;
//
//import com.sg.dto.base.bff.req.BffAdInfoRepDto;
//import com.sg.entity.OmsCommonAdinfo;
//import com.sg.entity.OmsCommonAdinfoExample;
//import com.sg.service.base.bff.AdCodeInfoService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.util.List;
//
//
/// **
// * @author ：CHS
// * @since 2022/3/28 14:43
// *
// *
// * @version 1.0
// */
//@Service
//public class AdCodeInfoServiceImpl implements AdCodeInfoService {
//
//    @Autowired
//    OmsCommonAdinfoMapper mapper;
//
//    @Override
//    public List<OmsCommonAdinfo> queryList(BffAdInfoRepDto req) {
//        OmsCommonAdinfoExample example = new OmsCommonAdinfoExample();
//        OmsCommonAdinfoExample.Criteria criteria = example.createCriteria();
//        if (req.getAdcode() != null && !req.getAdcode().isEmpty()) criteria.andAdcodeEqualTo(req.getAdcode());
//        if (req.getCitycode() != null && !req.getCitycode().isEmpty()) criteria.andCitycodeEqualTo(req.getCitycode());
//
//        if (req.getAdcode() == null && req.getAdcode().isEmpty() && req.getCitycode() == null && req.getCitycode().isEmpty()) {
//            criteria.andAdcodeEqualTo("-1");
//        }
//        return mapper.selectByExample(example);
//    }
//}
